#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <memory.h>

/* Maximum number of terms on the right-hand side. */
#define MAX_TERMS 12 

/* A term, t in the expression is represented by an integer:
 * If t > 0, it stores the integral term value;
 * If t < 0, ~t stores the node index to an sub-expression;
 * It t = 0, it indicates an error condition.
 */
typedef int term_t;

/* Represents a node in an expression tree. */
typedef struct Node
{
    term_t left;    /* left operand; >0 means integer, <0 means ~node_index */
    term_t right;   /* right operand */
    char   op;      /* operator: + or - or *, or '\0' */
    int    op_pos;  /* index in the source string to insert the operator */
} Node;

/* Represents an expression tree. */
typedef struct Expression
{
    Node tree[MAX_TERMS*2];
    int num_nodes;
    term_t start;   /* root of the expression tree */
} Expression;

/* Parses an expression, which is a space-separated list of positive integers
 * and ()-enclosed sub-expressions. Returns a positive integer to represent
 * a plain number, a negative integer to represent the node index of the expr,
 * or 0 if ')' or end-of-string is encountered without reading any expr.
 *
 * The input is read starting from s[*pos], and upon return (*pos) is set to 
 * point to the next character after the expression.
 */
static term_t parse_expr(const char *s, int *pos, Expression *expr)
{
    const char *p = s + *pos;
    term_t prev = 0;  /* previous term */

    while (*p == ' ') /* skip white space */
        p++;  
    
    while (*p != '\0' && *p != ')')
    {
        term_t term;

        /* Allocate a node to hold this expression. This is required to ensure
         * that the tree nodes are in the same order as the operators appear
         * in the equation, so that it's easy to enumerate expressions in
         * lexical order.
         */
        if (prev != 0)
        {
            int i = expr->num_nodes++;
            expr->tree[i].left = prev;
            expr->tree[i].right = 0;
            expr->tree[i].op = 0;
            expr->tree[i].op_pos = p - s;
            prev = ~i;
        }

        /* Check the next token. */
        if (*p == '(')
        {
            int newpos = p + 1 - s;
            term = parse_expr(s, &newpos, expr);
            for (p = s + newpos; *p++ != ')'; );    /* eat ')' */
        }
        else
        {
            term = strtol(p, (char **)&p, 10);
        }
        
        if (prev == 0) /* this is the first term */
            prev = term;
        else
            expr->tree[~prev].right = term;

        while (*p == ' ') p++;  /* skip white space */
    }
    *pos = (p - s);
    return prev;
}

/* Parses an equation into an expression. Returns the left-hand side. */
static int parse_equation(const char *s, Expression *expr)
{
    const char *p;
    int target = strtol(s, (char **)&p, 10);
    int pos;
    if (target == 0)
        return 0;

    while (*p++ != '=');    /* skip equal sign */

    pos = p - s;
    expr->start = parse_expr(s, &pos, expr);
    return target;
}

/* Evaluates an expression starting from term k. Returns 0 if failed. */
static int evaluate(const Expression *expr, term_t k)
{
    int left, right;

    if (k > 0)
        return k;

    left = evaluate(expr, expr->tree[~k].left);
    right = evaluate(expr, expr->tree[~k].right);
    if (left == 0 || right == 0) /* failed */
        return 0;

    switch (expr->tree[~k].op)
    {
    case '+':
        return left + right;
    case '-':
        return left - right;
    case '*':
        return left * right;
    default:
        return 0;
    }
}

/* Builds a string from an expression tree. */
static void build_expr(const Expression *expr, const char *src, char *dst)
{
    int i = 0, j = 0, k = 0;
    for (; src[i]; i++)
    {
        if (k < expr->num_nodes && i == expr->tree[k].op_pos)
            dst[j++] = expr->tree[k++].op;
        if (src[i] != ' ')
            dst[j++] = src[i];
    }
    dst[j] = '\0';
}

/* Solves the expression for target, by trying all combinations of operators
 * starting from the i-th operator. Returns 1 if solved, or 0 if impossible.
 */
static int solve(Expression *expr, int target, int i)
{
    if (i == expr->num_nodes) /* all operators fixed */
    {
        if (evaluate(expr, expr->start) == target)
            return 1;
        else
            return 0;
    }

    expr->tree[i].op = '+';
    if (solve(expr, target, i+1))
        return 1;

    expr->tree[i].op = '-';
    if (solve(expr, target, i+1))
        return 1;

    expr->tree[i].op = '*';
    if (solve(expr, target, i+1))
        return 1;

    return 0;
}

int main()
{
    char s[90];
    int t;
    Expression expr;
    int target;
    for (t = 1; fgets(s, sizeof(s), stdin); t++)
    {
        size_t n = strlen(s);
        if (n == 0)
            break;
        if (s[n-1] == '\n')
            s[n-1] = '\0';

        memset(&expr, 0, sizeof(expr));
        if ((target = parse_equation(s, &expr)) == 0)
            break;

        printf("Equation #%d:\n", t);
        if (solve(&expr, target, 0))
        {
            char result[100];
            build_expr(&expr, s, result);
            printf("%s\n", result);
        }
        else
        {
            printf("Impossible\n");
        }
        printf("\n");
    }
    return 0;
}